package com.zjh.r2dbc.repositories;

import com.zjh.r2dbc.entity.Emp;
import com.zjh.r2dbc.entity.User;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;

/**
 * @Auther: zjh
 * @Date: 2025/11/5 - 11 - 05 - 1:41
 * @Description: com.zjh.r2dbc.respositories
 * @version: 1.0
 */
@Repository
public interface EmpRepositories extends ReactiveCrudRepository<Emp,Integer> {//那个类，主键类型
    //一对一查询 这种要处理映射 但是需要转换器，所以这种emp持久层只写简单的查询，可以写empvo持久层去写转换器
//    @Query("SELECT e.*, d.DNAME, d.LOCFROM emp eLEFT JOIN dept d ON e.DEPTNOS = d.DEPTNOS ")
//    Flux<Emp> findEmpWithDept();

}
